#ifndef CNTR_USER
#define CNTR_USER

#include <string>
#include <stdexcept>
#include <iostream>
#include <cstdlib>
#include <sstream>
#include <exception>
#include "../../domain.h"
#include "../../interface.h"
#include "../../controller.h"
#include "../../persistence.h"
#include "user.h"
#include "InterfaceUser.h"
#include "cmd_user.h"
#include "../../selector.h"
#include "../../interaction.h"

using namespace std;


/**   IMPLEMENTA AS REGRAS DE NEGOCIO E SOLICITA SERVICOS PARA AS CONTROLADORAS DE INTERFACE E PERSISTENCIA.
 Classe modelo de controladora para o Usuario. */
class ControllerUser : public Controller {
        int MIN_OPT;
        int MAX_OPT;
        int MAX_TOLERANCE;
        InterfaceUser * interface;
        cmd_user * cmd;

    public:
        ControllerUser(InterfaceUser*,cmd_user *);
        int execute();
        int alterarNome();
        int alterarSenha();
        int alterarEndereco();
        int apagarConta();
};

/** Classe modelo de controladora para a Autenticacao.
  IMPLEMENTA AS REGRAS DE NEGOCIO E SOLICITA SERVICOS PARA AS CONTROLADORAS DE INTERFACE E PERSISTENCIA.
*/
class ControllerAuth : public Controller {
        int MIN_OPT;
        int MAX_OPT;
        int MAX_TOLERANCE;
        InterfaceAuth * interface;
        cmd_auth * cmd;
        Interaction * interaction;

    public:
        ControllerAuth(InterfaceAuth*,cmd_auth *);
        int execute();
        int fazerLogin();
        int cadastrar();
};

#endif // CONTROLLER
